<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<ui:composition template="/WEB-INF/template/basicTemplate.xhtml">
	<ui:define name="jsLinks">
		<h:outputScript target="head" library="js" name="countdown.js"></h:outputScript>
	</ui:define>
	<ui:define name="content">
		<h:inputHidden rendered="#{menuController.userRank != 2}" value="#{menuController.redirect()}"></h:inputHidden>
		<h:inputHidden value="#{menuController.setUrl(request.requestURL)}"></h:inputHidden>
		<h:inputHidden rendered="#{menuController.userRank == 2}">
		<h:outputText id="countdown" name="countdown"></h:outputText>
		<f:verbatim>
			<script type="text/javascript">
				countdown(#{questionController.nrOfMinutes});
			</script>
		</f:verbatim>
			<h:form align="center">
				<h:inputHidden id="current" value="#{questionController.page}"></h:inputHidden>
				<h:commandButton styleClass="button" value="Review"
					action="#{questionController.reviewRedirect}" /> 
					&nbsp;&nbsp;&nbsp;
	
				<h:commandButton id="finishTestButton" name="finishTestButton"
					styleClass="button" value="Finish"
					action="#{questionController.finishTest}" />
				<br />
				<br />
				<br />
				<br />
				<br />
				<h:panelGrid columns="1" styleClass="templatetable inner-table">
					<h:outputText value="Question:" styleClass="questiontitle"></h:outputText>
					<h:outputText styleClass="boldText"
						value="#{questionController.questiondto.text}" />
					<br />
					<h:outputText value="Answers:" styleClass="answertitle"></h:outputText>
					<h:selectManyCheckbox value="#{questionController.checkbox1}"
						styleClass="inner-table">
						<f:selectItem itemLabel="#{questionController.questiondto.answer1}"
							itemValue="1" />
					</h:selectManyCheckbox>
					<h:selectManyCheckbox value="#{questionController.checkbox2}"
						styleClass="inner-table">
						<f:selectItem itemLabel="#{questionController.questiondto.answer2}"
							itemValue="2" />
					</h:selectManyCheckbox>
					<h:selectManyCheckbox value="#{questionController.checkbox3}"
						styleClass="inner-table">
						<f:selectItem itemLabel="#{questionController.questiondto.answer3}"
							itemValue="3" />
					</h:selectManyCheckbox>
					<h:selectManyCheckbox value="#{questionController.checkbox4}"
						styleClass="inner-table">
						<f:selectItem itemLabel="#{questionController.questiondto.answer4}"
							itemValue="4" />
					</h:selectManyCheckbox>
				</h:panelGrid>
				<br />
				<div align="center"><h:outputText styleClass="boldText"
					value="#{questionController.pagebottom}">
				</h:outputText></div>
				<br />
				<h:outputText value="#{pageContext.current}"></h:outputText>
				<div align="center">
					<h:commandButton value="Done"
						styleClass="#{questionController.done}"
						action="#{questionController.updateCandidatesAnswer}"
						disabled="#{questionController.notTheEnd}">
					</h:commandButton>
					&nbsp;&nbsp;&nbsp; 
					<h:commandButton value="Mark for review"
						styleClass="#{questionController.mark}"
						disabled="#{questionController.ok}"
						action="#{questionController.markForReview}" />
						<br />
				</div>
		 		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</h:form>
		</h:inputHidden>
	</ui:define>
</ui:composition>
</html>